**** PROGRAM FILE FOR SI3: Alternative Propensity Weighting Schemes ****
 
 





 * OPEN "HISTORICAL BUDGET" DATABASE CONTAINING NEW VARIABLES * 
 use data_final.dta, clear 



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************




*** DECLARE DATABASE AS A PANEL (AGENCY ID * FISCAL YEAR): 

xtset agenid fyear, yearly

*
*
*


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** I. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY CONTROL [USING BUDGETARY GROWTH AS DEPENDENT VARIABLE] ***




*** ESTIMATE EXECUTIVE BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateect
*
absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ecti

lincomest _cons + executiveagency
estimate store ecte
*
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateecr
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ecri

lincomest _cons + executiveagency
estimate store ecre

*
*
*
*
*** ESTIMATE CONGRESSIONAL BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecct
*
absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ccti

lincomest _cons + executiveagency
estimate store ccte
*
*
*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateccr

*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store ccri

lincomest _cons + executiveagency
estimate store ccre

*** Creating Coefficient Plots for Budget Control Models***
*** Figure 1A ***
/*coefplot (ateect, rename(_cons="All Agencies (ATE)")) ///
         (ecte, rename((1)="Executive Agencies (ATE: E)")) ///
         (ecti, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (ecti, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateecr, rename(_cons="All Agencies (ATE)")) ///
         (ecre, rename((1)="Executive Agencies (ATE: E)")) ///
         (ecri, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (ecri, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  order ("All Agencies (ATE)" "Executive Agencies (ATE: E)" "Independent Agencies (ATE: I)" "Difference (ATE: E - I)") /// 
		  byopts(title ("Treatment Effects of BACA on Executive Budget Control", span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\gph\Figure1A.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Figure1A.png", replace

*** Figure 1B ***
coefplot (atecct, rename(_cons="All Agencies (ATE)")) ///
         (ccte, rename((1)="Executive Agencies (ATE: E)")) ///
         (ccti, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (ccti, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateccr, rename(_cons="All Agencies (ATE)")) ///
         (ccre, rename((1)="Executive Agencies (ATE: E)")) ///
         (ccri, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (ccri, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  order ("All Agencies (ATE)" "Executive Agencies (ATE: E)" "Independent Agencies (ATE: I)" "Difference (ATE: E - I)") /// 
		  byopts(title ("Treatment Effects of BACA on Legislative Budget Control", span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\gph\Figure1B.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Figure1B.png", replace */


*** Figure 1 ***
coefplot (ateect, rename(_cons="Executive Estimates (ATE)") \ ///
			atecct, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (ecte, rename((1)="Executive Estimates (ATE: E)") \ ///
			ccte, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (ecti, keep (_cons) rename(_cons="Executive Estimates (ATE: I)") \ ///
			ccti, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		 (ecti, drop (_cons) rename(executiveagency= "Executive Estimates (ATE: E - I)")\ ///
			ccti, drop (_cons) rename(executiveagency= "Congressional Appropriations (ATE: E - I)")) ///
		  ,  bylabel(Total Budget)  ///
		  ||                       ///
		 (ateecr, rename(_cons="Executive Estimates (ATE)")\ ///
			ateccr, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (ecre, rename((1)="Executive Estimates (ATE: E)")\ ///
			ccre, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (ecri, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			ccri, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		 (ecri, drop (_cons) rename(executiveagency= "Executive Estimates (ATE: E - I)")\ ///
			ccri, drop (_cons) rename(executiveagency= "Congressional Appropriations (ATE: E - I)")) ///
		  , bylabel(Regular Budget)   ///
		  || ,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ///
		  ciopts(recast(rcap)) nooffsets msize(medsmall) ///
		  order("Executive Estimates (ATE)""Congressional Appropriations (ATE)". ///
		  "Executive Estimates (ATE: E)" "Congressional Appropriations (ATE: E)". ///
		  "Executive Estimates (ATE: I)" "Congressional Appropriations (ATE: I)". ///
		  "Executive Estimates (ATE: E - I)" "Congressional Appropriations (ATE: E - I)") ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		   title("Figure 1. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive and Legislative Budget Control", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\gph\Figure1.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\Figure1.png", replace


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
		  
		  

*** II. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY STABILITY IN NATURAL LOGARITHMS AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateest
*
absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store esti

lincomest _cons + executiveagency
estimate store este

*
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store ateesr
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store esri

lincomest _cons + executiveagency
estimate store esre

*
*
*

*** ESTIMATE CONGRESSIONAL BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecst
*
absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store csti

lincomest _cons + executiveagency
estimate store cste
*
*
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atecsr
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle
estimate store csri

lincomest _cons + executiveagency
estimate store csre

*** Creating Coefficient Plots for Budget Stability Models***
*** Figure 2A ***
/* coefplot (ateest, rename(_cons="All Agencies (ATE)")) ///
         (este, rename((1)="Executive Agencies (ATE: E)")) ///
         (esti, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (esti, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateesr, rename(_cons="All Agencies (ATE)")) ///
         (esre, rename((1)="Executive Agencies (ATE: E)")) ///
         (esri, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (esri, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  order ("All Agencies (ATE)" "Executive Agencies (ATE: E)" "Independent Agencies (ATE: I)" "Difference (ATE: E - I)") /// 
		  byopts(title ("Treatment Effects of BACA on Executive Budget Stability", span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\gph\Figure2A.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Figure2A.png", replace

*** Figure 2B ***
coefplot (atecst, rename(_cons="All Agencies (ATE)")) ///
         (cste, rename((1)="Executive Agencies (ATE: E)")) ///
         (csti, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (csti, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (atecsr, rename(_cons="All Agencies (ATE)")) ///
         (csre, rename((1)="Executive Agencies (ATE: E)")) ///
         (csri, keep (_cons) rename(_cons="Independent Agencies (ATE: I)")) ///
		 (csri, drop (_cons) rename(executiveagency= "Difference (ATE: E - I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  order ("All Agencies (ATE)" "Executive Agencies (ATE: E)" "Independent Agencies (ATE: I)" "Difference (ATE: E - I)") /// 
		  byopts(title ("Treatment Effects of BACA on Legislative Budget Stability", span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\gph\Figure2B.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Figure2B.png", replace */

*** Figure 2 ***
coefplot (ateest, rename(_cons="Executive Estimates (ATE)")\ ///
			atecst, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (este, rename((1)="Executive Estimates (ATE: E)")\ ///
				cste, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (esti, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			csti, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		 (esti, drop (_cons) rename(executiveagency= "Executive Estimates (ATE: E - I)")\ ///
			csti, drop (_cons) rename(executiveagency= "Congressional Appropriations (ATE: E - I)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateesr, rename(_cons="Executive Estimates (ATE)")\ ///
			atecsr, rename(_cons="Congressional Appropriations (ATE)")) ///
		 (esre, rename((1)="Executive Estimates (ATE: E)")\ ///
			csre, rename((1)="Congressional Appropriations (ATE: E)")) ///
		 (esri, keep (_cons) rename(_cons="Executive Estimates (ATE: I)")\ ///
			csri, keep (_cons) rename(_cons="Congressional Appropriations (ATE: I)")) ///
		 (esri, drop (_cons) rename(executiveagency= "Executive Estimates (ATE: E - I)")\ ///
			csri, drop (_cons) rename(executiveagency= "Congressional Appropriations (ATE: E - I)")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w)  ///
		  ciopts(recast(rcap)) nooffsets msize(medsmall)                      ///
		  order("Executive Estimates (ATE)""Congressional Appropriations (ATE)". ///
		  "Executive Estimates (ATE: E)" "Congressional Appropriations (ATE: E)". ///
		  "Executive Estimates (ATE: I)" "Congressional Appropriations (ATE: I)". ///
		  "Executive Estimates (ATE: E - I)" "Congressional Appropriations (ATE: E - I)") ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure 2. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive and Legislative Budget Stability", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\gph\Figure2.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\Figure2.png", replace



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** III. ESTIMATE EFFECTS OF BAA REFORMS ON EXECUTIVE-LEGISLATIVE BUDGETARY COHERENCE IN NATURAL LOGARITHMS (+1) AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE-CONGRESSIONAL BUDGET COHERENCE USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS ***

absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle 
estimate store atebct
*
absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store bcti

lincomest _cons + executiveagency
estimate store bcte
*
*
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle
estimate store atebcr
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle
estimate store bcri

lincomest _cons + executiveagency
estimate store bcre
*
*
*
*** Creating Coefficient Plots for Budget Coherence Models***
*** Figure 3 ***
coefplot (atebct, rename(_cons="ATE: All Agencies")) ///
		 (bcte, rename((1)="ATE: Executive Agencies")) ///
		 (bcti, keep (_cons) rename(_cons="ATE: Independent Agencies")) ///
		 (bcti, drop (_cons) rename(executiveagency= "ATE: E - I")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (atebcr, rename(_cons="ATE: All Agencies")) ///
		 (bcre, rename((1)="ATE: Executive Agencies")) ///
		 (bcri, keep (_cons) rename(_cons="ATE: Independent Agencies")) ///
		 (bcri, drop (_cons) rename(executiveagency= "ATE: E - I")) ///
		  , bylabel(Regular Budget) ///
          ||, ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure 3. 1921 Budget and Accounting Act Average Treatment Effects on" "Executive-Legislative Budget Coherence", size(med)span)) 
		  
*graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\gph\Figure3.gph", replace
*graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\post_PMRA\Figure3.png", replace


**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** IV. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY CONTROL [USING BUDGETARY GROWTH AS DEPENDENT VARIABLE] ***



*** ESTIMATE EXECUTIVE BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Truncated SLE} ***

absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store ateectt
*
*
absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store ectit

lincomest _cons + executiveagency
estimate store ectet
*
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store ateecrt
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store ecrit

lincomest _cons + executiveagency
estimate store ecret

*
*
*
*
*** ESTIMATE CONGRESSIONAL BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Truncated SLE} ***

absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store atecctt
*
*
absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store cctit

lincomest _cons + executiveagency
estimate store cctet
*
*
*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store ateccrt
*

*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store ccrit

lincomest _cons + executiveagency
estimate store ccret



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** V. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY STABILITY IN NATURAL LOGARITHMS AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Truncated SLE} ***

absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store ateestt
*
*
absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store estit

lincomest _cons + executiveagency
estimate store estet

*
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store ateesrt
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle csinf(0.1) csup(0.90)
*
estimate store esrit

lincomest _cons + executiveagency
estimate store esret

*
*
*

*** ESTIMATE CONGRESSIONAL BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Truncated SLE} ***

absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store atecstt
*
absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle csinf(0.1) csup(0.90)
estimate store cstit

lincomest _cons + executiveagency
estimate store cstet
*
*
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store atecsrt
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) sle csinf(0.1) csup(0.90)
estimate store csrit

lincomest _cons + executiveagency
estimate store csret



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** VI. ESTIMATE EFFECTS OF BAA REFORMS ON EXECUTIVE-LEGISLATIVE BUDGETARY COHERENCE IN NATURAL LOGARITHMS (+1) AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE-CONGRESSIONAL BUDGET COHERENCE USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Truncated SLE} ***

absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store atebctt
*
absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
estimate store bctit

lincomest _cons + executiveagency
estimate store bctet
*
*
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) sle csinf(0.1) csup(0.90)
estimate store atebcrt
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle csinf(0.1) csup(0.90)
estimate store bcrit

lincomest _cons + executiveagency
estimate store bcret
*
*
*

**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************



*** VII. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY CONTROL [USING BUDGETARY GROWTH AS DEPENDENT VARIABLE] ***



*** ESTIMATE EXECUTIVE BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Polynomial} ***

absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  
estimate store ateectp
*
*
absdid execbudchangetot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency)  
*
estimate store ectip

lincomest _cons + executiveagency
estimate store ectep
*
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store ateecrp
*
*
absdid execbudchangereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency)
estimate store ecrip

lincomest _cons + executiveagency
estimate store ecrep

*
*
*
*
*** ESTIMATE CONGRESSIONAL BUDGET CONTROL USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Polynomial} ***

absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)
estimate store atecctp
*
*
absdid congbudchangetot, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) 
*
estimate store cctip

lincomest _cons + executiveagency
estimate store cctep
*
*
*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty  presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store ateccrp
*

*
absdid congbudchangereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) 

estimate store ccrip

lincomest _cons + executiveagency
estimate store ccrep

*** Creating Appendix Plots for Budget Control Models ***
*** Figure SI-3A: Executive Budget Control Models: Comparison of Alternative Propensity Weighting Schemes***
coefplot (ateect, rename(_cons="ATE (Sle)") \ ///
			ateectt, rename(_cons="ATE (Sle Truncated)") \ ///
			ateectp, rename(_cons="ATE (Linear)")) ///
         (ecte, rename((1)="ATE: E (Sle)") \ ///
			ectet, rename((1)="ATE: E (Sle Truncated)")\  ///
			ectep, rename((1)="ATE: E (Linear)")) ///
         (ecti, drop(executiveagency) rename(_cons="ATE: I (Sle)") \ ///
			ectit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)") \  ///
			ectip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateecr, rename(_cons="ATE (Sle)") \ ///
			ateecrt, rename(_cons="ATE (Sle Truncated)") \ ///
			ateecrp, rename(_cons="ATE (Linear)")) ///
         (ecre, rename((1)="ATE: E (Sle)") \ ///
			ecret, rename((1)="ATE: E (Sle Truncated)") \ ///
			ecrep, rename((1)="ATE: E (Linear)")) ///
         (ecri, drop(executiveagency) rename(_cons="ATE: I (Sle)") \ ///
			ecrit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)") \ ///
			ecrip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Regular Budget) ///
		  ||,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  order("ATE (Sle)" "ATE (Sle Truncated)" "ATE (Linear)" . ///
                "ATE: E (Sle)" "ATE: E (Sle Truncated)" "ATE: E (Linear)" . ///
                "ATE: I (Sle)" "ATE: I (Sle Truncated)" "ATE: I (Linear)" ) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure SI-3A. 1921 BAA Average Treatment Effects on Executive Budget Control:" ///
		  "Comparison of Alternative Propensity Weighting Schemes", size (med)span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure SI-3A.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure SI-3A.png", replace		  

*** Figure SI-3B: Legislative Budget Control Models: Comparison of Alternative Propensity Weighting Schemes***
coefplot (atecct, rename(_cons="ATE (Sle)")\ ///
			atecctt, rename(_cons="ATE (Sle Truncated)")\ ///
		 	atecctp, rename(_cons="ATE (Linear)")) ///
         (ccte, rename((1)="ATE: E (Sle)")\ ///
			cctet, rename((1)="ATE: E (Sle Truncated)")\ ///
			cctep, rename((1)="ATE: E (Linear)")) ///
         (ccti, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			cctit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			cctip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateccr, rename(_cons="ATE (Sle)")\ ///
			ateccrt, rename(_cons="ATE (Sle Truncated)")\ ///
			ateccrp, rename(_cons="ATE (Linear)")) ///
         (ccre, rename((1)="ATE: E (Sle)")\ ///
			ccret, rename((1)="ATE: E (Sle Truncated)")\ ///
			ccrep, rename((1)="ATE: E (Linear)")) ///
         (ccri, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			ccrit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			ccrip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Regular Budget) ///
		  ||,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  order("ATE (Sle)" "ATE (Sle Truncated)" "ATE (Linear)" . ///
                "ATE: E (Sle)" "ATE: E (Sle Truncated)" "ATE: E (Linear)" . ///
                "ATE: I (Sle)" "ATE: I (Sle Truncated)" "ATE: I (Linear)" ) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure SI-3B. 1921 BAA Average Treatment Effects on Legislative Budget Control:" ///
		  "Comparison of Alternative Propensity Weighting Schemes", size (med)span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure SI-3B.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure SI-3B.png", replace	



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************




*** VIII. ESTIMATE EFFECTS OF BAA REFORMS ON BUDGETARY STABILITY IN NATURAL LOGARITHMS AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Polynomial} ***

absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store ateestp
*
*
absdid lnexecbudstabletot, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency)  
*
estimate store estip

lincomest _cons + executiveagency
estimate store estep

*
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)
estimate store ateesrp
*
*
absdid lnexecbudstablereg, tvar(bureauofbudget)  xvar(presidentparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency)
*
estimate store esrip

lincomest _cons + executiveagency
estimate store esrep

*
*
*

*** ESTIMATE CONGRESSIONAL BUDGET STABILITY USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Polynomial} ***

absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store atecstp
*
absdid lncongbudstabletot, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency) 
estimate store cstip

lincomest _cons + executiveagency
estimate store cstep
*
*
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store atecsrp
*
absdid lncongbudstablereg, tvar(bureauofbudget)  xvar(housemajorityparty presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
appropcommchairstabilityest realgnpgrowth realfeddeficitgnp lnagencyage)  yxvar(executiveagency)
estimate store csrip

lincomest _cons + executiveagency
estimate store csrep



*** Creating Appendix Plots for Budget Stability Models ***
*** Figure SI-3C: Executive Budget Stability Models: Comparison of Alternative Propensity Weighting Schemes***
coefplot (ateest, rename(_cons="ATE (Sle)")\ ///
			ateestt, rename(_cons="ATE (Sle Truncated)")\ ///
			ateestp, rename(_cons="ATE (Linear)")) ///
         (este, rename((1)="ATE: E (Sle)")\ ///
			estet, rename((1)="ATE: E (Sle Truncated)")\ ///
			estep, rename((1)="ATE: E (Linear)")) ///
         (esti, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			estit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			estip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (ateesr, rename(_cons="ATE (Sle)")\ ///
			ateesrt, rename(_cons="ATE (Sle Truncated)")\ ///
			ateesrp, rename(_cons="ATE (Linear)")) ///
         (esre, rename((1)="ATE: E (Sle)")\ ///
			esret, rename((1)="ATE: E (Sle Truncated)")\ ///
			esrep, rename((1)="ATE: E (Linear)")) ///
         (esri, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			esrit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			esrip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Regular Budget) ///
		  ||,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  order("ATE (Sle)" "ATE (Sle Truncated)" "ATE (Linear)" . ///
                "ATE: E (Sle)" "ATE: E (Sle Truncated)" "ATE: E (Linear)" . ///
                "ATE: I (Sle)" "ATE: I (Sle Truncated)" "ATE: I (Linear)" ) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure SI-3C. 1921 BAA Average Treatment Effects on Executive Budget Stability:" ///
		  "Comparison of Alternative Propensity Weighting Schemes", size (med)span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure SI-3C.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure SI-3C.png", replace		  

*** Figure SI-3D: Legislative Budget Stability Models: Comparison of Alternative Propensity Weighting Schemes***
coefplot (atecst, rename(_cons="ATE (Sle)")\ ///
			atecstt, rename(_cons="ATE (Sle Truncated)")\ ///
			atecstp, rename(_cons="ATE (Linear)")) ///
         (cste, rename((1)="ATE: E (Sle)")\ ///
			cstet, rename((1)="ATE: E (Sle Truncated)")\ ///
			cstep, rename((1)="ATE: E (Linear)")) ///
         (csti, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			cstit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			cstip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (atecsr, rename(_cons="ATE (Sle)")\ ///
			atecsrt, rename(_cons="ATE (Sle Truncated)")\ ///
			atecsrp, rename(_cons="ATE (Linear)")) ///
         (csre, rename((1)="ATE: E (Sle)")\ ///
			csret, rename((1)="ATE: E (Sle Truncated)")\ ///
			csrep, rename((1)="ATE: E (Linear)")) ///
         (csri, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			csrit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			csrip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Regular Budget) ///
		  ||,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  order("ATE (Sle)" "ATE (Sle Truncated)" "ATE (Linear)" . ///
                "ATE: E (Sle)" "ATE: E (Sle Truncated)" "ATE: E (Linear)" . ///
                "ATE: I (Sle)" "ATE: I (Sle Truncated)" "ATE: I (Linear)" ) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure SI-3D. 1921 BAA Average Treatment Effects on Legislative Budget Stability:" ///
		  "Comparison of Alternative Propensity Weighting Schemes", size (med)span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure SI-3D.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure SI-3D.png", replace	



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************




*** IX. ESTIMATE EFFECTS OF BAA REFORMS ON EXECUTIVE-LEGISLATIVE BUDGETARY COHERENCE IN NATURAL LOGARITHMS (+1) AS DEPENDENT VARIABLE ***



*** ESTIMATE EXECUTIVE-CONGRESSIONAL BUDGET COHERENCE USING ABADIE'S SEMI-PARAMETRIC PROPENSITY SCORE WEIGHTED ESTIMATOR OF HETEROGENEOUS AVERAGE TREATMENT EFFECTS {Polynomial} ***

absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage)  
estimate store atebctp
*
absdid ln1execbudcoherencetot, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) 
estimate store bctip

lincomest _cons + executiveagency
estimate store bctep
*
*
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) 
estimate store atebcrp
*
absdid ln1execbudcoherencereg, tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability senatemajoritypartystability ///
unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) 
estimate store bcrip

lincomest _cons + executiveagency
estimate store bcrep
*
*
*
*** Figure SI-3E: Budget Coherence Models: Comparison of Alternative Propensity Weighting Schemes***
coefplot (atebct, rename(_cons="ATE (Sle)")\ ///
			atebctt, rename(_cons="ATE (Sle Truncated)")\ ///
			atebctp, rename(_cons="ATE (Linear)")) ///
         (bcte, rename((1)="ATE: E (Sle)")\ ///
			bctet, rename((1)="ATE: E (Sle Truncated)")\ ///
			bctep, rename((1)="ATE: E (Linear)")) ///
         (bcti, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			bctit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			bctip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Total Budget) ///
		  ||                       ///
		 (atebcr, rename(_cons="ATE (Sle)")\ ///
			atebcrt, rename(_cons="ATE (Sle Truncated)")\ ///
			atebcrp, rename(_cons="ATE (Linear)")) ///
         (bcre, rename((1)="ATE: E (Sle)")\ ///
			bcret, rename((1)="ATE: E (Sle Truncated)")\ ///
			bcrep, rename((1)="ATE: E (Linear)")) ///
         (bcri, drop(executiveagency) rename(_cons="ATE: I (Sle)")\ ///
			bcrit, drop(executiveagency) rename(_cons="ATE: I (Sle Truncated)")\ ///
			bcrip, drop(executiveagency) rename(_cons="ATE: I (Linear)")) ///
		  ,  bylabel(Regular Budget) ///
		  ||,                        ///
          nokey xline (0, lcolor(black) lwidth(thin) lpattern(dash)) grid(w) ciopts(recast(rcap)) ///
		  nooffsets msize(medsmall) ///
		  order("ATE (Sle)" "ATE (Sle Truncated)" "ATE (Linear)" . ///
                "ATE: E (Sle)" "ATE: E (Sle Truncated)" "ATE: E (Linear)" . ///
                "ATE: I (Sle)" "ATE: I (Sle Truncated)" "ATE: I (Linear)" ) ///
		  byopts(note("Point Estimates and Corresponding 95% Confidence Intervals", j(right) place(seast) size(vsmall)) ///
		  title ("Figure SI-3E. 1921 BAA Average Treatment Effects on Budget Coherence:" ///
		  "Comparison of Alternative Propensity Weighting Schemes", size (med)span)) 
		  
graph save "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\gph\Figure SI-3E.gph", replace
graph export "C:\Users\Jin\Dropbox\BACA paper\Graphs\Governance\Figure SI-3E.png", replace	



**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
**********************************************************************************************************************************************************************************************************
 log close




*****Check Which Agencies are dropped in the analysis and how many observations are included******

***Sample: budget coherence model using total budget data
absdid ln1execbudcoherencetot , tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability ///
senatemajoritypartystability unifiedpartygovt sharedtenureest realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle

***generate predicted values for observations included in the estimation***
predict coh1 if e(sample)
***See which agencies are included in the estimation***
tab agenid, su(coh1)
***Check number of cases for exectuive and independent agencies pre- and post-BACA***
tab executiveagency bureauofbudget, su(coh1)


***t-test****
absdid execbudchangetot , tvar(bureauofbudget)  xvar(presidentialstabilityadministrat housemajoritypartystability ///
senatemajoritypartystability unifiedpartygovt agencyheadstability realgnpgrowth realfeddeficitgnp lnagencyage) yxvar(executiveagency) sle

predict econtrol if e(sample)

ttest agencyheadstability if econtrol!=. & bureauofbudget==0,by (executiveagency) 
ttest agencyheadstability if econtrol!=. & bureauofbudget==1,by (executiveagency) 

ttest extramuralfunds if econtrol!=. & bureauofbudget==0,by(executiveagency) 
ttest extramuralfunds if econtrol!=. & bureauofbudget==1,by(executiveagency) 

gen realfeddeficitgnp = (federaldeficitasaofgnp /implicitpricedeflator1958)*100




